<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>

</body>
<script>
  const filterParams = (data) => {
    const params = Object.keys(data).filter((key) => data[key] !== null && data[key] !== undefined && data[key] !== '').reduce((acc, key) => ({
      ...acc,
      [key]: data[key]
    }), {});
    return params;
  }
  let a = {
    name: "susu",
    age: "",
    p: null,
    k: undefined,
    type: 0,
    status: false,
  }
  console.log('kk1', a)
  console.log(filterParams(a))
  console.log('kk', a)
</script>

</html>